<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>检验记录管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<!--
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/elmt/wbInspectRecord/">检验记录列表</a></li>
    <shiro:hasPermission name="elmt:wbInspectRecord:edit">
        <li><a href="${ctx}/elmt/wbInspectRecord/form">检验记录添加</a></li>
    </shiro:hasPermission>
</ul>
-->
<form:form id="searchForm" modelAttribute="wbInspectRecord" action="${pageContext.request.contextPath}/f/sydwfront/inspectList" method="post" class="breadcrumb form-search form-inline">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <input id="sbzcdm" name="sbzcdm" type="hidden" value="${wbInspectRecord.sbzcdm}"/>

    <div class="container-fluid">
        <div class="row">
            <div class="control-label col-xs-12">
                <label>检验机构：</label>
                <form:input path="inspectOrg" htmlEscape="false" maxlength="100" class="form-control input-sm "/>
                <label>检验日期：</label>
                <input name="inspectDate" type="text" readonly="readonly" maxlength="20" class="form-control input-sm  Wdate"
                       value="<fmt:formatDate value="${wbInspectRecord.inspectDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                       onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                <label>下次检验日期：</label>
                <input name="nextInspectDate" type="text" readonly="readonly" maxlength="20" class="form-control input-sm  Wdate"
                       value="<fmt:formatDate value="${wbInspectRecord.nextInspectDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                       onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
            </div>
        </div>
    </div>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>检验机构</th>
        <th>检验日期</th>
        <th>检验员</th>
        <th>下次检验日期</th>
        <th>检验结论</th>
        <th>设备注册代码</th>
        <shiro:hasPermission name="elmt:wbInspectRecord:edit">
            <th>操作</th>
        </shiro:hasPermission>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="wbInspectRecord">
        <tr>
            <td><a href="${pageContext.request.contextPath}/f/sydwfront/inspectForm?id=${wbInspectRecord.id}">
                    ${wbInspectRecord.inspectOrg}
            </a></td>
            <td>
                <fmt:formatDate value="${wbInspectRecord.inspectDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
            <td>
                    ${wbInspectRecord.inspectMan}
            </td>
            <td>
                <fmt:formatDate value="${wbInspectRecord.nextInspectDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
            <td>
                    ${fns:getDictLabel(wbInspectRecord.inspectResult, 'INSPECT_RESULT', '')}
            </td>
            <td>
                    ${wbInspectRecord.sbzcdm}
            </td>
            <shiro:hasPermission name="elmt:wbInspectRecord:edit">
                <td>
                    <a href="${ctx}/elmt/wbInspectRecord/form?id=${wbInspectRecord.id}">修改</a>
                    <a href="${ctx}/elmt/wbInspectRecord/delete?id=${wbInspectRecord.id}" onclick="return confirmx('确认要删除该检验记录吗？', this.href)">删除</a>
                </td>
            </shiro:hasPermission>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>